import houseList from '../src/data/fanghouse.json'
import customerlist from '../src/data/customer.json'
// 接口数据
export default {
  // 楼盘
    "GET /api/getHouselist":(req:any,res:any)=>{
      res.send(houseList.data)
    },
    // 获取楼盘详情数据
    "GET /gethousedetail":(req:any,res:any)=>{
        //  console.log(req.query,'111')
         const{id} = req.query
        //  根据id筛选数据
        const housedetailarr = houseList.data.find((item)=>{
          return item.id == id
        })
        res.send(housedetailarr)
    },

    // 客服列表
    "GET /customer":(req:any,res:any)=>{
      res.send(customerlist.data)
    }
}

